export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  viewBtn: true,
  delBtn: false,
  viewBtnText: '预览',
  labelWidth: 160,
  selection:true,
  height: 450,
  "column": [
    {
      "type": "input",
      "label": "",
      "prop": "id",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "线路编码",
      "prop": "lineCode",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "车站编码",
      "prop": "stationCode",
      hide: true,
      display: false,
    }, {
      "type": "number",
      "label": "加收票款金额",
      "prop": "chargeMoney",
	  precision: 2,
      hide: true,
      display: false,
    }, {
      "type": "number",
      "label": "其他票款金额",
      "prop": "otherMoney",
      precision: 2,
      formatter: function (row,value,label,column) {
        var pattern1 = /[1-9]*/;
        var pattern2 =/^([1-9]*[\.][0-9]{1})?$/;
        if(value==null){
          return value;
        }
        if(pattern2.test(value)){
          return value+"0";
        }
        if(pattern1.test(value)){
          return value+".00";
        }
        return value;
      },
      // rules: [{
      //   required: true,
      //   message: '请输入其他票款金额',
      //   trigger: 'blur'
      // }]

    }, {
      "type": "number",
      "label": "交接长款",
      "prop": "customerHandoverLong",
      precision: 2,
      formatter: function (row,value,label,column) {
        var pattern1 = /[1-9]*/;
        var pattern2 =/^([1-9]*[\.][0-9]{1})?$/;
        if(value==null){
          return value;
        }
        if(pattern2.test(value)){
          return value+"0";
        }
        if(pattern1.test(value)){
          return value+".00";
        }
        return value;
      },
      // rules: [{
      //   required:"true",
      //   message: '请输入客值交接长款',
      //   trigger: 'blur'
      // }]
    }, {
      "type": "select",
      "label": "录入人",
      "prop": "entryName",
      search: true,
      props: {
        label: 'nikename',
        value: 'userCode'
      },
      filterable: true,
      dicUrl: `/admin/user/page/byStation`,
      editDisabled: false,
      params: {
        userCodeKey: 'entryCode',
      },
      component: 'user-select',
      rules: [{
        required:"true",
        message: '请选择录入人',
        trigger: 'blur'
      }]
    }, {
      "type": "input",
      "label": "录入人工号",
      "prop": "entryCode",
      disabled: true,
    }, {
      "type": "date",
      "label": "收益日期",
      "prop": "entryDate",
      search: true,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      row: true,
      rules: [{
        required:"true",
        message: '请选择收益日期',
        trigger: 'blur'
      }]
    }, {
      "type": "textarea",
      "label": "备注",
      "prop": "remark",
      span: 24,
    }, {
      "type": "input",
      "label": "部门ID",
      "prop": "deptId",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "修改时间",
      "prop": "updateTime",
      hide: true,
      display: false,
    }, {
      "type": "input",
      "label": "删除:1 未删除0",
      "prop": "delFlag",
      hide: true,
      display: false,
    }]
}
